package com.zqxq.lottery.cms.controller;


import com.zqxq.common.constant.Result;
import com.zqxq.lottery.cms.feign.LotteryServerFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(value = "开奖兑奖管理",tags = "开奖兑奖管理")
@RestController
@Slf4j
@RequestMapping(value = "/bonus", produces = "application/json")
public class BonusCalcController {

    @Autowired
    private LotteryServerFeignClient lotteryServerFeignClient;

    @ApiOperation(value = "订单-中奖计算", notes="订单-中奖计算")
    @PostMapping("/calc")
    public Result orderBonusCalc(Long lotteryId){
        return lotteryServerFeignClient.orderBonusCalc(lotteryId);
    }

    @ApiOperation(value = "订单-兑奖", notes="订单-兑奖")
    @PostMapping("/prize")
    public Result orderBonusPrize(Long lotteryId){
        return lotteryServerFeignClient.orderBonusPrize(lotteryId);
    }


}
